/**
 * Created by Administrator on 2017/2/2 0002.
 */
function  addLoadEvent(func) {
    var oldonload=window.onload;
    if(typeof oldonload!='function'){
        window.onload=func;
    }else{
        window.onload=function () {
            oldonload();
            func();
        }
    }
}
function insertAfter(newElement,targetElement){
    var parent=tagetElement.parentNode;
if(parent.lastChild==targetElement){
    parent.appendChild(newElement);
}else{
    parent.insertBefore(newElement,targetElement.nextSibling);
}
}
function addClass(element,value) {
 if(!element.className){
     element.className=value;
 }   else{
     newClassName=element.className;
     newClassName+=" ";
     newClassName+=value;
     element.className=newClassName;
 }
}
window.onload=insertAfter();
window.onload=addClass();
window.onload=addLoadEvent();
